home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 2
/
SPACE - Library 2 - Volume 1.iso
/
apps
/
284
/
applic
/
stgizmo.doc
< prev
next >
Wrap
Text File
|
1988-08-18
|
16KB
|
310 lines
This is the .ARC file containing the graphics program
ST GIZMO
By
Helge Skjeveland
1466 S. Main
Orem, UT 84058-7482
Tel.: (801)224-8483.
This program is not freeware, but SHAREware. I am asking
for $10 if you keep this program for subsequent use.
Commented LDW BASIC source code and a detailed explanation
(implementation notes) are available for an additional $15.
This .ARC file may be freely distributed via any BBS, or
via diskette. Please keep this README.DOC and STGIZMAN.DOC
with STGIZMO.PRG so that others may have the documentation
and I get the $10 from the kind souls who believe in paying
for what they use. Thanks.
--------------------------------------------------------------------------------
ST GIZMO MANUAL
ST GIZMO is a graphic-generating program. It will allow you to create
many interesting designs. It is designed to allow you to take a snapshot
(e.g., using SNAPSHOT.ACC, which is available with the GST's 1ST WORD PLUS)
of the screen, whence you can integrate the designs with your graphics pack-
ages. It is a fully implemented GEM application (GEM is a trademark of
Digital Research, Inc.). The following combined manual and tutorial will
both enable you to use the product and explain the theory behind it.
If you're like the author, you won't even read the instructions, but just
forge ahead and experiment, which is OK, since you can't damage the com-
puter or program by doing so; however, this is not a long manual, so when
you're through, come back and read through it: You will get far more
pleasure out of the money you paid if you do so. The program is, for your
convenience, not copy protected; but please, don't pirate it. I earn my
living programming, and I am just as poor as most of you out there. To
you 99% who paid for this program, thanks. I have tested this program
thoroughly, but if you find any problems, drop me a note, and I'll fix it.
Enjoy!!
Let's try ST GIZMO out: Invoke STGIZMO (by clicking on the STGIZMO.PRG
icon. You will see a dialog box appear that has various fields. For now,
just click on DONE (or hit RETURN -- as with all GEM buttons, if it has a
thick border, striking RETURN will select it, just as if you clicked on it
[this is called a "radio button"]). Then click on OK (strike RETURN) when
the TERMINATE DIALOG alert box appears. You will now see the rotating
heptagram (seven-pointed star) default pattern. Interesting and beautiful
patterns like this are easy to generate with ST GIZMO. Now click on the
close box in the upper left corner of the window, or select **QUIT** from
the FUNCTIONS menu, and answer YES to the alert box. You are now back at
the Data Entry dialog box. You can exit the program from here by clicking
on the EXIT box. Since this has a skinny border, you can only exit by
deliberately selecting it (a safety feature).
ST GIZMO is driven by parametric equations in two dimensions. What this
means is that there are two oscillating functions, one in the vertical,
the other in the horizontal. By modifying their initial size (scale),
decay rate, period, and phase it is possible to generate many interesting
patterns. By intelligently selecting the increment and choosing either
draw or plot mode it is possible to vastly increase the number and variety
of generatable patterns. ST GIZMO is compatible with all three ST reso-
lutions, but make sure that if you are going to incorporate your ST GIZMO
pattern with a preexistent graphic that you use the same resolution for
both the pattern and graphic (you cannot mix resolutions -- it's like
cramming a square peg into a round hole . . . it won't work).
For the purpose of the following examples, set the DECAY to a huge number,
say, 16E11 (one point six trillion, the national debt). This will prevent
the figure from shrinking while it draws, so that the actions will be clear.
On to the instructions:
The Data Entry dialog box functions are:
X:Y period ratio -- this determines how many times an oscillation
in one direction (X=horizontal) will occur for
an oscillation in the other direction (Y=verti-
cal). If you use 1:1, a phase angle 90 degrees,
and a small increment, you will get a circle.
This is because sin(t + 90)=cos(t), so you get
the parametric equation
/x=sin(t)
\y=cos(t),
a circle.
phase (phi) -- If you change the phase to 0, then you have the
parametric equation
/x=sin(t)
\y-sin(t).
Since x and y are doing the same thing, you get
an unexciting diagonal line.
If you use phase=45, then you get a nice ellipse
with aspect ratio 2:1 (since 90:45=2:1). To get
an ellipse of aspect 3:1, use 30 degrees (90:30=
3:1), and so on.
increment (theta)-- This specifies how big the angle increment you
want STGIZMO to increase by each time it draws or
plots. If you use phase 90 and 1:1 ratio and use
a small increment (say, five degrees), then you
will get what appears to be a circle; but since a
circle is a continuous set of points equidistant
from the center, and a computer can only deal in
fixed increments, you are really generating a
polygon of 72 sides (but THAT many sides LOOKS
like a circle). If you choose an increment of
90, you will get a diamond (rhombus). This is,
of course, a polygon of four sides.
120 generates an equilateral triangle, since
360/120=3.
To get a pentagon, use 72 degrees (360/5=72).
Now try something interesting: use 144 degrees
(144 = 2 x 72). You now have a five-pointed star,
a pentagram. This results because you are SKIPPING
every other vertex that would've resulted if you used
72 degrees (for, 144 = 2 x 72, see?).
The increment for the heptagon (seven-sided polygon)
is 51.4285 (~360/7).
Note that all the seven-sided figures will appear to
rotate slightly because seven will not divide evenly
into 360. If you want them to be more stable, use a
calculator (desk accessory or hand-held) to get a more
precise value for the increment(s), up to the maximum
the field size will allow.
There is only one possible pentagram, but there are
TWO possible unique heptagrams:
one uses the increment 102.8571 (2 x 51.4285),
and skips every OTHER vertex;
the other uses 153.257 (3 x 51.4285),
and skips TWO vertices each time.
The nonagon (nine sides) is generated by 360/9=40.
There are three possible nonagrams (enneagrams),
two of which can be generated by STGIZMO:
80, where every other vertex of the nonagon is
skipped; and
160, where FOUR vertices are skipped.
The remaining one is 120, which would be three inter-
laced equilateral triangles (3 x 3 = 9). Since the
computer can't draw these without "lifting its pen up,"
as it were, we can't directly generate it. If you want
to, make and snapshot the three separate triangles,
then overlay them onto each other in a graphics pack-
age using transparent mode.
If the number of vertices is not a prime number,
there will still be polygrams, but some will consist
of interlaced polygons (i.e., nine can be factored
into 3 x 3 -- three interlaced equilateral triangles).
Another interesting example of this is the octagram
(8 sides):
An octagon is generated by the increment 45 degrees.
Of course, you will remember that 2 x 45 = 90 degrees
generated a rhombus. That octagram is an interlaced
rhombus and square, thusly (crude):
/\
--------
|/ \|
/| |\
\| |/
|\ /|
--------
\/
Since two divides evenly into eight, we have two
distinct, interlaced polygons. You can make this by
snapshot/overlay techniques, too.
A continuous octagram is generated by using 3 x 45,
which is 135 degrees, since 3 doesn't divide evenly
into 8.
Happy exploring!
decay rate (delta)--The larger the decay rate, the slower the decay.
We set this to 16E11 (one point six trillion), which
makes for imperceptible shrinkage. If you use, say,
500 (as in the default heptagram), the figure will
slowly shrink. If you use an angular increment that
is slightly smaller or larger than will evenly divide
into 360, then the polygon or polygram will shrink and
rotate simultaneously, generating beautiful patterns
(especially for you fortunate monochrome monitor
owners!).
draw scale (sigma)--100% means full size, but if you want it smaller, you
can shrink its initial size, and it will shrink far-
ther from that point. You can also specify a larger
size than the full window (>100%): the pattern will be
clipped and shrink until it becomes visible, and thence
shrink as far as you desire. If you make the scale
too large, you may not be able to see the pattern for
a while, because the screen will be smaller than the
central hole! If your decay rate is set small enough,
and you wait, though, the pattern will eventually
show itself.
DRAW button --A line is drawn between successive positions.
PLOT button --Each successive position is plotted only.
DONE radio button --Terminate the dialog and go to display mode.
EXIT button --**QUIT** ST GIZMO
DISPLAY MODE:
In this mode the mouse arrow will eventually become invisible if you do not
move it; however, moving it at all makes it reappear.
CLOSE BOX (upper left-hand corner of the window): clicking here is the
same as clicking on the **QUIT** menu option.
WINDOW TITLE BAR: Indicates display attributes (drawing, plotting, or
paused)
MENUS: The menu becomes available the first time you run a pattern dis-
play.
ATARI/DESK--
ABOUT STGIZMO --program author's info
DESK ACCESS --You can invoke desk accessories here. You can, for
example, use a calculator accessory to find the values
to experiment with for entry into the dialog box; or
you can take snapshots of a pattern for use with a
graphics package, desktop publishing, etc.
***NOTE: WHEN YOUR MOUSE LEAVES THE DISPLAY WINDOW, THE PROGRAM
WILL BE PAUSED. FOR YOUR CONVENIENCE IT IS LEFT TO YOU
TO RESTART IT, IF DESIRED. TO DO SO, CLICK ON PAUSE
IN THE MENU TO TOGGLE THE DISPLAY ACTIVITY ON AGAIN.
FUNCTIONS --
PAUSE --automatically activated if your mouse pointer leaves
the display window. Click on it to resume drawing.
RERUN --erases the pattern and re-runs it. If nothing happens,
remember to check that PAUSE is not on (window title
and checked PAUSE menu entry).
**QUIT** --asks you "ARE YOU SURE?", if so, click on YES or press
RETURN to access the Data Entry dialog. If you want
to terminate ST GIZMO altogether, click on the EXIT
button in the Data Entry dialog: That is the only
EXIT point. You can also **QUIT** to the dialog box
by clicking on the window's close box (upper left
corner).
More about patterns:
If you use other than 1:1 in the ratio fields, you will get complex patterns
called Lissajous patterns (after the Frenchman who first studied them).
1:2 will give a portion of a parabola, 2:1 will give the same rotated 90 de-
grees. Using various increments with Lissajous patterns and PLOT mode will
create VERY slow but gorgeous patterns that have a three-dimensional appear-
ance. For example, try
ratio 1:2
phase 90
increment 153
decay 3000
scale 100
PLOT mode
or ratio 101:100
phase 90
increment 2
decay 16e11
scale 100
DRAW mode
and don't stay up all night! (I did, sometimes, while making STGIZMO)
*** END OF FILE ***